From 307cc69adb472bcdfeb1cafa01adf8948022f6f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonas=20=C3=85dahl?= Date: Tue, 17 Mar 2020 15:28:14 +0100 Subject: [PATCH] wayland: Add surface to toplevel list only if toplevel It was using another check (has parent) to do this, but now we have a much more obvious way of creating surfaces, so we can use the type directly. --- gdk/wayland/gdksurface-wayland.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 9b18d19993..f910c8b9fd 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -700,6 +700,9 @@ _gdk_wayland_display_create_surface (GdkDisplay *display, "display", display, "frame-clock", frame_clock, NULL); + display_wayland->toplevels = g_list_prepend (display_wayland->toplevels, + surface); + g_warn_if_fail (!parent); break; case GDK_SURFACE_POPUP: surface = g_object_new (GDK_TYPE_WAYLAND_POPUP, @@ -746,9 +749,6 @@ _gdk_wayland_display_create_surface (GdkDisplay *display, gdk_wayland_surface_set_title (surface, get_default_title ()); - if (parent == NULL) - display_wayland->toplevels = g_list_prepend (display_wayland->toplevels, surface); - impl->transient_for = parent; gdk_wayland_surface_create_surface (surface); -- 2.30.2